﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;
using System.Web.Mvc;
namespace DomainModel.Entities
{
    public class VehicleBrand
    {
        [KeyAttribute]
        [HiddenInput(DisplayValue = false)]
        public int VehicleBrandId { get; set; }

        [HiddenInput(DisplayValue = false)]
        public int? PictureId { get; set; }

        [HiddenInput(DisplayValue = false)]
        public DateTime? LastUpdate { get; set; }

        [HiddenInput(DisplayValue = false)]
        public bool IsApproved { get; set; }

        [HiddenInput(DisplayValue = false)]
        public string UserName { get; set; }

        [StringLength(500, ErrorMessage = "The Brand Name value cannot exceed 500 characters. ")]
        [Required(ErrorMessage = "Brand Name is required field.")]
        [Display(Name = "Vehicle Brand Name")]
        public string Name { get; set; }

        [StringLength(500, ErrorMessage = "يمكن أن تكون القيمة اسم لا يتجاوز 500 حرفا ")]
        [Required(ErrorMessage = "مطلوب اسم الحقل")]
        [Display(Name = "الاسم في اللغة العربية")]
        public string Name_Ar { get; set; }

        [ForeignKey("PictureId")]
        public virtual Picture Picture { get; set; }

        public virtual ICollection<Vehicle> Vehicles { get; set; }

    }
}
